﻿@model IndignadoFramework.FrontOffice.Models.ContenidoUploadModel

<script type="text/javascript">
	function clickOption(opt) {
	    var link = document.getElementById('link_button');
	    var coment = document.getElementById('Comentario');
        var combo = document.getElementById('Tipo');
	    var url = document.getElementById('URL');
	    var submitButton = document.getElementById('submit_button');

		if (opt == 'Link') {
			coment.style.display = '';
			url.style.display = '';
			link.innerHTML = '<b>Link</b>';
		}
		submitButton.style.display = '';
	}
</script>

<link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/Contenido.css")" />

@using (Html.BeginForm("Agregar", "Contenido", FormMethod.Post))
{
	<p id="title">Elija el tipo de contenido a subir</p>
	<p></p>
	<div id="link_button" onclick="clickOption('Link')">Link</div>
	<p></p>
    <fieldset>
        <div id="Comentario" style="display: none">
		    <div class="editor-label">
			    @Html.LabelFor(m => m.Comentario)
		    </div>
		    <div class="editor-field" style="padding: 1px">
			    @Html.TextBoxFor(m => m.Comentario, new { size = 55, style = "padding: 4px" })
		    </div>
	    </div>
	
	    <div id="URL" style="display: none">
		    <div class="editor-label">
			    @Html.LabelFor(m => m.URL)
		    </div>
		    <div class="editor-field">
			    @Html.TextBoxFor(m => m.URL, new { size = 55, style = "padding: 4px" })
		    </div>
	    </div>
	    <div class="editor-field" style="display: none">
		    @Html.DropDownListFor(m => m.Tipo, new SelectList(Enum.GetValues(typeof(IndignadoFramework.FrontOffice.Models.ContenidoUploadModel.TipoArchivo))))
	    </div>
    </fieldset>
    <br />	
	<div id="submit_button" style="display: none">
		<input id="submit" type="submit" value="Publicar"/>
	</div>
    <br />
}